package com.wego.ex;

import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.ToString;

/**
 *
 * @author hc
 * @date 2025-09-09 11:05
 */
@Getter
@Setter
@NoArgsConstructor
@ToString
public class GlobalException extends RuntimeException {
    /**
     * 错误码
     */
    private Integer code;
    /**
     * 错误信息
     */
    private String msg;

    public GlobalException(String msg) {
        super(msg);
        this.msg = msg;
    }

    public GlobalException(Integer code, String msg) {
        super(msg);
        this.code = code;
        this.msg = msg;
    }

}
